package cn.ito.zjgsu.domain.wrapper;

import java.util.List;

import com.alibaba.fastjson.JSON;

import cn.ito.zjgsu.domain.ProjectState;

public class ProjectStateWrapper {
	private ProjectState projectState;

	public ProjectState getProjectState() {
		return projectState;
	}

	public void setProjectState(ProjectState projectState) {
		this.projectState = projectState;
	}
	
	public String toJsonString(){
		return JSON.toJSONString(this);
	}
	
	public static String toJsonArrayString(List<ProjectStateWrapper> pws){
		return JSON.toJSONString(pws);
	}
	
	public static ProjectStateWrapper getTestEntry(){
		ProjectState projectState = new ProjectState();
		projectState.setArchived(false);
		projectState.setExamined(false);
		projectState.setId(1);
		projectState.setPecomposed(false);
		projectState.setStampd(false);
		projectState.setUndertaked(false);	
		projectState.setProjectid(1);
		ProjectStateWrapper pw = new ProjectStateWrapper();
		pw.setProjectState(projectState);
		return pw;
	}
	
	public static void testSelf(){
		ProjectStateWrapper pw = getTestEntry();
		System.out.println(pw.toJsonString());
	}
	
}
